

function autoexec()

  set_ent_id(7, SARINA)
  set_ent_id(6, NOSLOM)

return 
end

function refresh()
  
return
end

function postexec()
end

function zone_handler(zn)
  if (zn == 1) then    --door to outside
    change_map("townx","manor_exit");
 
  elseif (zn == 2) then  
    touch_fire(get_pidx(0)); 
 
  elseif (zn == 3) then 
    book_talk(get_pidx(0)); 


  end
end

function entity_handler(en)
  if (en == 0) then
   bubble(en,"Greetings!")

  elseif (en == 1) then
    bubble(en,"You are not permitted to enter any farther into the Governor's Mansion")

  elseif (en == 2) then
    bubble(en,"How are you sir?")
    bubble(HERO1,"Uh... Fine")
    bubble(en,"Splendid.")
  
  elseif (en == 3) then
    bubble(en,"Don't waste my time rifraf.")
 
  elseif (en == 4) then
    bubble(en,"Gobble... snort...")
    bubble(en,"Can't you see I'm eating.")

  elseif (en == 5) then
    bubble(en,"Ahh so much to be done!")
    bubble(en,"I have to write to the Earl of Windfallow... and then there is the letter from the ambassador of Lanaerta that needs to go to the king... I am much to busy to talk to you. Sorry.")

  elseif (en == 6) then
   if (get_progress(P_CHORES) == 6) then
     bubble(en,"Hello $0, did you bring them.")
     bubble(HERO1,"Yes sir. Here you go.")
     bubble(en,"Sarina, can I have a word with you.")
     bubble(7,"Yes Father.")
     set_ent_script(1, "R1")
     set_ent_facing(1, FACE_DOWN)
     wait_for_entity(1,1)
     move_entity(7, "sarina")
     wait_for_entity(7,7)
     set_ent_script(1, "L1U1D1")
     set_ent_facing(1, FACE_DOWN)
     wait_for_entity(en,1)
     bubble(en,"Take a look at this wonderful new dress I bought you.")
     bubble(7,"It's great Father.")
     set_ent_facing(en, FACE_UP)
     bubble(en,"You don't sound very excited about it.")
     bubble(7,"I already told you that I much rather be around adventuring then...")
     set_ent_facing(en, FACE_DOWN)
     bubble(en,"Ah... sorry about that $0.")
     bubble(en,"Have something for your troubles.")
     chest(12,0,50)
     bubble(HERO1,"You treat me so well Governor.")
     bubble(HERO1,"Thank you.")
     set_progress(P_CHORES,7)
     set_progress(P_GIRL,1)

   else
     bubble(en,"Thank you so much $0")  
  
   end

  
  elseif (en == 7) then
    bubble(en,"Thank you.") 
  
  end
  end
  



